package com.cmdi.mq.constant;

/**
 * @Description: CommonConstant
 * @Author: gaozb
 */
public class CommonConstant {
    /**
     * 对称加密密钥
     */
    public final static String SIGNINE_KEY = "AUTH123";
    /**
     * Request中登录类型标识
     * 后台管理人员、普通的用户
     */
    public static final  String LOGIN_TYPE = "login_type" ;
    public static final  String ADMIN_TYPE = "admin" ;
    public static  final  String USER_TYPE = "user" ;

    /**
     * 使用用户名查询管理员账户
     */
    public static final String QUERY_ADMIN_SQL =
            "SELECT id,username,password, status FROM sys_user WHERE username = ? ";
    /**
     * 根据用户id查询权限
     */
    public static final String QUERY_ADMIN_PERMS_SQL =
            "SELECT sys_privilege.name FROM sys_privilege LEFT JOIN sys_role_privilege ON sys_role_privilege.privilege_id = sys_privilege.id LEFT JOIN sys_user_role  ON sys_role_privilege.role_id = sys_user_role.role_id WHERE sys_user_role.user_id = ?";
}